using System.Collections.Generic;
using System.Threading.Tasks;
using Comteck.Dto.Goods;
using Comteck.Entities.Goods;

namespace Comteck.Ktt.Services.Goods {
  /// <summary>
  /// 
  /// </summary>
  public interface IProductService : IScopedDependency {
    /// <summary>
    /// 查询分页主表数据
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task<AjaxResponsePage<List<ProductDto>>> GetPageListAsync(ProductQuery model);

    /// <summary>
    /// 查询分页主表数据
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task<IEnumerable<ProductDto>> GetAllAsync();

    /// <summary>
    /// 查询分页主表数据
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task<IEnumerable<ProductDto>> GetListByIdsAsync(List<int> ids);

    /// <summary>
    /// 
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<ProductDto> GetEditModelAsync(int id);

    /// <summary>
    /// 新增
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task<AjaxResponse<ProductDto>> SaveAsync(ProductDto model);

    /// <summary>
    /// 新增
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task<IEnumerable<Product>> InsertBatchAsync(IEnumerable<Product> list);

    /// <summary>
    /// 新增
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task DeleteAsync(int id);

    /// <summary>
    /// 批量更新
    /// </summary>
    /// <param name="list"></param>
    /// <returns></returns>
    Task SaveBatchAsync(IEnumerable<ProductDto> list);
  }
}
